package training.raj;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;

public class ImplementorCodeProcessor {

	
	public static void main(String[] args) {
		File file=new File("C:\\Users\\dahalrr\\Desktop\\LinkedCode.txt");
	//	File f=new File("LinkedCode.txt");
//		File file=new File("LinkedCode");
		File file2=new File("../CodeFileProcessor/src/ProcessedCode2");
		try {
//			BufferedReader reader=new BufferedReader(new FileReader(f));
			BufferedReader reader=new BufferedReader(new FileReader(file));
			PrintWriter writer=new PrintWriter(file2);
			try {
				String s0=null;
				
				while((s0=reader.readLine())!=null){
		//			String s=reader.readLine();
					System.out.println(s0);
					String s1=s0.trim();
					System.out.println("trimmed value"+s1);
					if(!s0.isEmpty()){
					if(!Character.isDigit(s0.charAt(0))){
				writer.printf("%s",s0);
								writer.println();
								}
					}
				}//while closer
				reader.close();
				writer.close();

			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}
